package com.lv.controller;

import com.alibaba.fastjson.JSONObject;
import com.lv.data.Result;
import com.lv.service.OrderService;
import com.lv.util.JwtUtil;
import com.lv.util.LoginUser;
import io.jsonwebtoken.Claims;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("order")
public class OrderController {

    @Autowired
    private OrderService os;

    //提交订单
    @PostMapping("submitOrder")
    public Result submitOrder(@RequestHeader String AutharizeToken, @RequestParam Long addressId,@RequestParam String payType){
        os.submitOrder(AutharizeToken,addressId,payType);
        return Result.OK();
    }
}
